You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(supabase): reject non-string url and key in create_client - #2065
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: d4d72a4c-c2af-47c8-8b18-d803bad78084
Commits
Reviewing files that changed from the base of the PR and between 6f2ba79 and 8c84382.
Files selected for processing: 4
src/supabase/src/supabase/aiohttp.py
src/supabase/src/supabase/client.py
src/supabase/src/supabase/httpx.py
src/supabase/tests/test_client.py
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Bug Fixes
Client setup now reports clearer errors when the URL or key is missing or has an invalid type.
The client constructor now validates that the URL and key are strings and are not falsey. Parameterized sync and async tests cover invalid URL and key inputs and check the reported SupabaseException messages.
Change: Bug fix
Merge Risk: Minimal · previous review 6f2ba
The change makes invalid URL or key arguments raise a clear SupabaseException instead of a raw AttributeError or TypeError. Tests cover the new behavior, and no merge-blocking risk is apparent.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: bd8eb0c7-3a0e-463b-b736-1fe0021337a4
Commits
Reviewing files that changed from the base of the PR and between 439735e and 6f2ba79.
Files selected for processing: 2
src/supabase/src/supabase/client.py
src/supabase/tests/test_client.py
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the v2 fix from #1926 to v3. SDK-2831
supabase_urlorsupabase_keynow raisesSupabaseExceptionwith a clear message instead of a rawAttributeErrororTypeError.SupabaseClientcovers both the async and sync client.create_clientandcreate_async_clientfactories run the check before creating an HTTP session, like they already do forrequest_timeout.